﻿/* light */
:root {
    --nmd-editor-border: #d8dee4;
    --nmd-editor-color: #000000;
    --nmd-editor-bg: #ffffff;
}

/* dark */
.netnrmd-dark {
    --nmd-editor-border: #585b60;
    --nmd-editor-color: #d4d4d4;
    --nmd-editor-bg: #0d1117;
}

    .netnrmd-dark body {
        background-color: var(--nmd-editor-bg);
    }

    /*scrollbar*/
    .netnrmd-dark *::-webkit-scrollbar-track-piece {
        background: transparent
    }

    .netnrmd-dark *::-webkit-scrollbar {
        background-color: #202022
    }

    .netnrmd-dark *::-webkit-scrollbar-thumb {
        background-color: #585859;
        border: 3px solid #202022;
        min-height: 24px;
    }

        .netnrmd-dark *::-webkit-scrollbar-thumb:focus {
            background-color: #838384
        }

        .netnrmd-dark *::-webkit-scrollbar-thumb:active {
            background-color: #838384
        }

    .netnrmd-dark *::-webkit-scrollbar-corner {
        background-color: #202022
    }

/*容器*/
.netnrmd {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    color: var(--nmd-editor-color);
    border: 1px solid var(--nmd-editor-border);
}

/*全屏*/
.netnrmd-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 6666;
    border-radius: 0;
    border-color: transparent;
}

    .netnrmd-fullscreen .netnrmd-toolbar {
        border-radius: 0;
    }

/*工具条容器*/
.netnrmd-toolbar {
    width: 100%;
    float: left;
    border-radius: 3px 3px 0 0;
    background-color: var(--nmd-editor-bg);
    border-bottom: 1px solid var(--nmd-editor-border);
}
/*工具条*/
.netnrmd-menu {
    margin: 0;
    padding: 0 5px;
    list-style: none;
}

    .netnrmd-menu li {
        float: left;
        opacity: .8;
        height: 28px;
        padding: 3px;
        margin: 3px 4px;
        cursor: pointer;
        user-select: none;
        box-sizing: border-box;
        border: 1px solid transparent;
    }

        .netnrmd-menu li.float-right {
            float: right;
        }

        .netnrmd-menu li svg {
            height: 100%;
            fill: currentColor;
            text-align: center;
            vertical-align: top;
            pointer-events: none;
            box-sizing: content-box;
        }

        .netnrmd-menu li:hover, .netnrmd-menu li.active {
            opacity: 1;
            color: orange;
        }

/*编辑容器*/
.netnrmd-write {
    position: relative;
    float: left;
    width: 50%;
    box-sizing: border-box;
    border-right: 1px solid var(--nmd-editor-border);
}

    .netnrmd-write > * {
        margin: 0;
        padding: 0;
    }

/*渲染视图*/
.netnrmd-view {
    position: relative;
    width: 50%;
    float: right;
    padding: 15px;
    overflow-y: auto;
    word-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
    background-color: var(--nmd-editor-bg);
}

    /*编辑模式，限制图片最大高度，同步滚动效果更佳*/
    .netnrmd-view img {
        max-height: 160px;
    }

/*最大编辑*/
.netnrmd-write-w100 {
    width: 100%;
    border-right: none;
}
/*最大视图*/
.netnrmd-view-w100 {
    width: 100%;
    display: flex;
    align-items: flex-start;
}

@media screen and (min-width: 1361px) {
    .netnrmd-view-w100 > *:first-child {
        width: 70%;
        flex: 1;
    }

    .netnrmd-view-w100 .netnrmd-toc {
        display: block;
    }
}

/*隐藏*/
.netnrmd-write-hidden,
.netnrmd-view-hidden {
    opacity: 0;
    display: none;
    overflow: hidden;
    pointer-events: none;
}

/*空视图*/
.netnrmd-view-empty {
    color: #999;
    line-height: 50px;
    text-align: center;
}

/*弹窗*/
.netnrmd-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 6666;
    background-color: rgba(51, 51, 51, .6);
}

    .netnrmd-popup .np-card {
        width: 100%;
        max-width: 800px;
        margin: 10vh auto 0;
        border-radius: 6px;
        color: var(--nmd-editor-color);
        background-color: var(--nmd-editor-bg);
    }

    .netnrmd-popup .np-header {
        height: 40px;
        padding: 0 15px;
        line-height: 40px;
        border-bottom: 1px solid var(--nmd-editor-border);
    }

    .netnrmd-popup .np-close {
        float: right;
        outline: none;
        font-size: 18px;
        color: currentColor;
        text-decoration: none;
    }

        .netnrmd-popup .np-close:hover {
            color: orange;
            text-decoration: none;
        }

    .netnrmd-popup .np-body {
        padding: 15px;
        max-height: 66vh;
        overflow-y: auto;
        word-break: break-word;
    }

    .netnrmd-popup a {
        color: #0369a1;
        text-decoration: none;
    }

        .netnrmd-popup a:hover {
            text-decoration: underline;
        }

/*表情*/
.netnrmd-emoji ul {
    display: flex;
    flex-wrap: wrap;
    font-size: 1.4em;
    margin: .5em 0 1em;
    padding: 0;
}

.netnrmd-emoji li {
    padding: 0.2em;
    cursor: pointer;
    list-style: none;
    min-width: 50px;
    min-height: 50px;
    text-align: center;
    box-sizing: border-box;
}

    .netnrmd-emoji li:hover {
        transform: scale(1.6);
        transition: transform .2s linear;
    }
